import {
    SET_FOCUS_SHOW
} from '../mutation-types';



const state = {
    show: false
}

const mutations = {
    [SET_FOCUS_SHOW](state) {
        state.show = !state.show
    }
}

const actions = {
    CHANGE_FOCUS_SHOW: ({ commit, dispatch }) => {
        commit(SET_FOCUS_SHOW)
            /*
            Q: 为什么还需要 dispatch ?
            A: 还可以 dispatch 其他 action
            */
    }
}

export default {
    state,
    actions,
    mutations
}